package org.tailor

class Shirt {
	static searchable = true
    long shirtID
    String designName
    //static hasMany=[rating:Rating]
    static hasMany=[rating:Rating, fabric:Fabric]
    //static hasMany=[fabric:Fabric]
    
    static belongsTo=[tailor:Tailor]
    //static belongsTo=Orders

    Rating rating
    OtherAddOn otherAddOn
    Collar collar
    Monogram monogram
    Cuff cuff
    
    String shirtName
    byte[] designPicture
    String note
    String shirtFront
    String shirtBack
    String shoulderFit
    int pocketType
    int monoText
	List fabric
    
    static constraints = {
        shirtID(blank:false, unique:true)
        designName(blank:false)
		designPicture(maxSize:50000000)
    }
}
